from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB
from diagrams.aws.storage import S3

with Diagram("第一阶段", show=False):

    user = RDS("用户 sys_user")
    userRelation = EC2(" sys_user_role") >> user <<EC2(" sys_user_post")

    role = RDS("角色 sys_role")
    roleRelation = EC2(" sys_role_dept") >> role <<EC2(" sys_role_menu")

    ELB("第一阶段start") >> [
         user,
         role,
         RDS("部门 sys_dept"),
         RDS("菜单 sys_menu"),
         RDS("岗位 sys_post"),
         ] >> S3("第一阶段end")